package com.yueqian.service.impl;

import com.yueqian.dao.IProductDao;
import com.yueqian.domain.Product;
import com.yueqian.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements IProductService {
    @Autowired
    private IProductDao productDao;

    @Override
    public List<Product> findAll() throws Exception {
        System.out.println("业务层....findAll");
        List<Product> products = productDao.findAll();
        return products;
    }

    @Override
    public void save(Product product) {
        productDao.save(product);
    }
}
